fix(assets): resolver Character Creator refs via upload absoluto - #220
Merged
IAnMove merged 1 commit intoSep 7, 2026
Merged
Conversation
…resolve refs
ensureUploadsPath returned uploads/${name} for already-uploaded images.
Auto-describe resolves relative names under the uploads root, so that
path became uploads/uploads/${name} and the default empty-prompt orbit
flow 400'd. Always copy through /api/v1/upload and keep the absolute
path the upload API already returns.
Co-authored-by: ignaciodelcano+dcl <ignaciodelcano+dcl@gmail.com>
IAnMove
marked this pull request as ready for review
September 7, 2026 14:15
Author
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_1e8ba4a3-ec07-46c4-8b3f-b428e073a8fe) |
3 tasks
Owner
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Resumen ejecutivo
Qué cambia
ensureUploadsPathdeja de inventaruploads/${nombre}y copia cada imagen de Labs por/api/v1/uploadpara devolver la ruta absoluta que ya entrega esa API.Para qué sirve
El flujo por defecto de Character Creator (foto del dispositivo + A Prompt vacío) llamaba a auto-describe con
uploads/hero.png. El backend resuelve nombres relativos dentro deuploads/, así que buscabauploads/uploads/hero.pngy respondía 400. Sin esto no se puede generar la órbita.Impacto para el usuario
Elegir una foto local en Character Creator y pulsar generar vuelve a funcionar. Series sigue importando, ahora con una copia extra en
uploads/.Riesgo
Estado
Summary
Minimal fix for PR #218.
ensureUploadsPathshort-circuited already-uploaded catalog/device picks asuploads/${item.name}. Character Creator auto-describe (needsVisionDescribewhen the A prompt is empty — the default) resolves relative names under the uploads root via_resolve_model3d_input_path, so that path becameuploads/uploads/${name}and the orbit job 400'd with "Character reference image not found".The helper now always
fetches the chosen image and POSTs/api/v1/upload, returning the absolutepaththat Series import, describe, and H3isfilechecks already accept.Overview
AssetInputalready uploaded it to/api/v1/uploads/<uuid>.png).applyRefcallsensureUploadsPath.{ path: "uploads/<name>" }. After: re-copies and returns{ path: "<cwd>/uploads/<new-uuid>.png" }.describeCharacterRefs({ image_paths })finds the file.importSeriesAssetkeep working with the same absolute path.Detailed changes
Backend
None.
_resolve_model3d_input_pathis unchanged; callers now send a path it already understands.UI and Wizard
ui/src/lib/labsImagePick.ts: always copy throughuploadImage.Data, provenance and compatibility
Device/catalog picks that were already uploads get a second copy in
uploads/. Same as the previous catalog (non-upload) branch. No persisted schema change.Files and ownership
ui/src/lib/labsImagePick.ts— the helper introduced in feat(assets): migrate Labs CHR/STY fields to AssetInput #218.ui/tests/labsImagePick.test.mjs— locks the absolute-path contract.ui/tests/seriesLabsPicker.test.tsx— Series import now expects the upload API path.Validation
Date (UTC): 2026-09-07
Base SHA: 719d0d1 (
feat/asset-picker-labs)Head SHA: 7b4584c
Validation scope: focused
python scripts/verify_clean_repo.pypython -m compileall -q app/services app/launch.py scriptsFocused Python tests: N/A (UI-only)
cd ui && npm run i18n:checkUI tests:
npx tsx --tsconfig tsconfig.app.json --import ./tests/setupI18n.ts --test tests/labsImagePick.test.mjs tests/seriesLabsPicker.test.tsx→ 3 passed; plustests/seriesShotSelection.test.tsx tests/seriesShotsAccessibility.test.tsx tests/characterCreator.test.tsx→ 11 passedcd ui && npm run lint -- --max-warnings=0cd ui && npm run buildgit diff --checkE2E/smoke checks: N/A — path-resolution unit/integration tests cover the trigger
Code quality
main: pending CICI and review
CI of this HEAD: pending
Independent agent review of this HEAD: pending
Human merge click (operational, not code review): pending
Reviewed at current HEAD
Earlier review; HEAD has changed since (stale)
Pending
Unavailable
Coste de la tarea
Notes and limitations
Stacked on #218 (
feat/asset-picker-labs). Merge this into that branch before merging Labs. Local picks now create a second uploads copy (AssetInput already uploaded once).Follow-up work
None required for this bug. Optional later: teach
_resolve_model3d_input_pathto strip a redundantuploads/prefix so relativeuploads/namepaths also resolve.Checklist
Note
Low Risk
UI-only path handling fix with no backend or schema changes; extra upload copies are the main behavioral side effect.
Overview
ensureUploadsPathno longer short-circuits images that already live under/api/v1/uploads/— every Labs pick is fetched and re-posted through/api/v1/upload, and callers get the API’s absolutepathinstead of a syntheticuploads/${name}.That fixes Character Creator’s default flow (device photo + empty A prompt): auto-describe was resolving
uploads/hero.pngasuploads/uploads/hero.pngand returning 400. Series canon import and other consumers now receive the same absolute path contract.Tests were updated: unit tests mock fetch + upload for both upload URLs and workspace file URLs; the Series Labs picker integration expects
uploadPath: '/abs/uploads/copied.png'. Trade-off: picks that were already in uploads get an extra copy inuploads/.Reviewed by Cursor Bugbot for commit 7b4584c. Configure here.